package com.ruoyi.system.api.factory;

import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.system.api.RemotePostService;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 用户服务降级处理
 *
 * @author ruoyi
 */
@Component
public class RemotePostFallbackFactory implements FallbackFactory<RemotePostService>
{
    private static final Logger log = LoggerFactory.getLogger(RemotePostFallbackFactory.class);

    @Override
    public RemotePostService create(Throwable throwable) {
        return new RemotePostService() {
            @Override
            public TableDataInfo postFeignClient(String postName) {
                return null;
            }
        };
    }
}
